/**
 * 环境配置封装
 * @param dev 开发环境
 * @param test 测试环境
 * @param production 线上模式
 * @returns env mock [baseApi,mockApi]
 * @date 2020-07-31
 */
const env = process.env.NODE_ENV
const namespace = 'abi' // 存储Storage命名空间
const EnvConfig = {
  development: {
    baseApi: '/api',
    mockApi:
      'https://www.fastmock.site/mock/c1c302e8baed9894c48c17e4738c092e/api',
  },
  test: {
    baseApi: '//',
    mockApi:
      'https://www.fastmock.site/mock/c1c302e8baed9894c48c17e4738c092e/api',
  },
  production: {
    baseApi: '/api',
    mockApi:
      'https://www.fastmock.site/mock/c1c302e8baed9894c48c17e4738c092e/api',
  },
}
export default {
  env,
  mock: false,
  namespace,
  ...EnvConfig[env],
}
